package cn.wolfcode.p2p.business.domain;

import cn.wolfcode.p2p.base.domain.BaseDomain;
import cn.wolfcode.p2p.base.domain.LoginInfo;
import cn.wolfcode.p2p.util.Constants;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;
@Getter@Setter
public class CreditTransfer extends BaseDomain{

    public static  final int TANSFER_STATE_NORMAL = 0;
    public static  final int TANSFER_STATE_TRANSFERING = 1;
    private Integer version = 0;

    private Long bidId;

    private Long bidRequestId;

    private BigDecimal bidRequestAmount;

    private BigDecimal currentRate;

    private int returnType;

    private int monthIndex;//借款总还款期数

    private int remainMonthIndex;//剩余的还款期数

    private BigDecimal remainInterest;//剩余还款利息

    private Date closestDeadLine;//最近一次还款时间

    private String bidRequestTitle;//借款标题

    private Integer bidRequestState = Constants.BIDREQUEST_STATE_BIDDING;//转让标的状态,装让中,取消,

    private LoginInfo transFrom;

    private LoginInfo transTo;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date publishDate;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date transDate;

}